extends "../hailunna-3/hailunna-3.gd"


var baseId = ""
var upText1 = "库拉湾之梦系数+10%"
var upText2 = "强制冷却额外恢复目标30%血量并清除其全部负面效果"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("<固化>每8秒强行恢复一名队友的全部技能及鱼雷冷却", "强制冷却")

var flag = 0
func _upS():
	._upS()
	flag += 1
	if flag >= 8:
		forceCooldown()
		flag = 0

func _onBattleStart():
	._onBattleStart()
	flag = 0

func forceCooldown():
	utils.createSkillTextEff("强制冷却", position)
	var chas = getAllChas(2)
	chas.shuffle()
	for i in range(chas.size()):
		var cha = chas[i]
		if cha.skills.size() == 0 or cha.id == id or cha.isSumm:continue
		utils.createSkillTextEff("清空冷却", cha.position)
		for j in cha.skills:
			j.nowTime += j.cd
		if upgraded == 2:
			healCha(cha, cha.att.maxHp*0.3)
			weakDispel(cha, true)	
		break

